#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int, int>

const int maxn = 1005;

int n, X[maxn], Y[maxn];
int pos[maxn], rak[maxn];
ll totnum, minum, miarea;

struct LINE {
    int i, j;
    ll dx, dy;
    LINE(int _i, int _j) {
        i = _i, j = _j;
        dx = X[j] - X[i], dy = Y[j] - Y[i];
        if (dx < 0) dx = -dx, dy = -dy;
    }
    bool operator<(const LINE& oth) const {
        if (dx == 0) return true;
        if (oth.dx == 0) return false;
        return dy * oth.dx < dx* oth.dy;
    }
};

ll Cross(int a, int u, int v) {
    return 1LL * (X[u] - X[a]) * (Y[v] - Y[a]) -
        1LL * (Y[u] - Y[a]) * (X[v] - X[a]);
}

void UPD(int a, int b, int c, int d) {
    ll area = abs(Cross(a, c, b)) + abs(Cross(a, c, d));
    if (miarea > area) miarea = area, minum = 0;
    if (miarea == area) {
        minum++;
        if ((Cross(b, d, a) ^ Cross(b, d, c)) > 0) minum++;
        // concave quadrilateral
    }
}

int main() {
    scanf("%d", &n);
    for (int i = 0; i < n; i++) scanf("%d %d", &X[i], &Y[i]);

    vector<LINE> line;
    for (int i = 0; i < n; i++)
        for (int j = i + 1; j < n; j++) line.push_back(LINE(i, j));
    sort(line.begin(), line.end());

    iota(pos, pos + n, 0);
    sort(pos, pos + n,
        [&](int i, int j) { return pii(X[i], -Y[i]) < pii(X[j], -Y[j]); });
    for (int i = 0; i < n; i++) rak[pos[i]] = i;

    miarea = (ll)9e18;
    for (LINE now : line) {
        int u = now.i, v = now.j;
        int ru = rak[u], rv = rak[v];
        // assert(abs(ru - rv) == 1);
        int k = min(ru, rv);
        for (int left = max(0, k - 2); left < k; left++) {
            for (int right = k + 2; right < min(k + 4, n); right++) {
                UPD(pos[k], pos[left], pos[k + 1], pos[right]);
            }
        }
        totnum += k * (n - k - 2);

        swap(pos[ru], pos[rv]);
        swap(rak[u], rak[v]);
    }

    printf("%lld\n", totnum + minum);
}